home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / CTBUtilities.mod < prev    next >
Encoding:
Text File  |  1995-08-10  |  5.1 KB  |  193 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        CTBUtilities.mod
  3.  
  4.      Contains:    Communications Toolbox Utilities interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$IF UNDEFINED OLDROUTINENAMES*)
  21. (*$SET OLDROUTINENAMES FALSE*)
  22. (*$END*)
  23. (*$TAGS-*)
  24. (*$CALLING PASCAL*)
  25. MODULE CTBUtilities;
  26.  
  27. IMPORT SYSTEM, Types, Dialogs, AppleTalk;
  28.  
  29. (* $PUSH*)
  30. (* $ALIGN MAC68K*)
  31. (* $LibExport+*)
  32.  
  33. CONST
  34. (*    version of Comm Toolbox Utilities    *)
  35.     curCTBUVersion*                = 2;
  36. (*    Error codes/types    *)
  37.     ctbuGenericError*            = -1;
  38.     ctbuNoErr*                    = 0;
  39.  
  40.     
  41. TYPE
  42.     CTBUErr* = Types.OSErr;
  43.  
  44.  
  45. CONST
  46.     chooseDisaster*                = -2;
  47.     chooseFailed*                = -1;
  48.     chooseAborted*                = 0;
  49.     chooseOKMinor*                = 1;
  50.     chooseOKMajor*                = 2;
  51.     chooseCancel*                = 3;
  52.  
  53.     
  54. TYPE
  55.     ChooseReturnCode* = INTEGER;
  56.  
  57.  
  58. CONST
  59.     nlOk*                        = 0;
  60.     nlCancel*                    = 1;
  61.     nlEject*                        = 2;
  62.  
  63.     
  64. TYPE
  65.     NuLookupReturnCode* = INTEGER;
  66.  
  67.  
  68. CONST
  69.     nameInclude*                    = 1;
  70.     nameDisable*                    = 2;
  71.     nameReject*                    = 3;
  72.  
  73.     
  74. TYPE
  75.     NameFilterReturnCode* = INTEGER;
  76.  
  77.  
  78. CONST
  79.     zoneInclude*                    = 1;
  80.     zoneDisable*                    = 2;
  81.     zoneReject*                    = 3;
  82.  
  83.     
  84. TYPE
  85.     ZoneFilterReturnCode* = INTEGER;
  86.  
  87.     DialogHookProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (item: INTEGER; theDialog: Dialogs.DialogPtr): INTEGER;
  88.     DialogHookUPP* = Types.UniversalProcPtr;
  89.  
  90. CONST
  91.     uppDialogHookProcInfo* = $000003A0; (* PROCEDURE (2 byte param, 4 byte param): 2 byte result; *)
  92.  
  93. PROCEDURE NewDialogHookProc*(userRoutine: DialogHookProcPtr): DialogHookUPP;
  94.     (*$IF NOT GENERATINGCFM *)
  95.     INLINE PASCAL $2E9F;
  96.     (*$END*)
  97.  
  98. PROCEDURE CallDialogHookProc*(item: INTEGER; theDialog: Dialogs.DialogPtr; userRoutine: DialogHookUPP): INTEGER;
  99.     (*$IF NOT GENERATINGCFM*)
  100.     INLINE PASCAL $205F, $4E90;
  101.     (*$END*)
  102.  
  103. CONST
  104. (*    Values for hookProc items        *)
  105.     hookOK*                        = 1;
  106.     hookCancel*                    = 2;
  107.     hookOutline*                    = 3;
  108.     hookTitle*                    = 4;
  109.     hookItemList*                = 5;
  110.     hookZoneTitle*                = 6;
  111.     hookZoneList*                = 7;
  112.     hookLine*                    = 8;
  113.     hookVersion*                    = 9;
  114.     hookReserved1*                = 10;
  115.     hookReserved2*                = 11;
  116.     hookReserved3*                = 12;
  117.     hookReserved4*                = 13;
  118. (*    "virtual" hookProc items    *)
  119.     hookNull*                    = 100;
  120.     hookItemRefresh*                = 101;
  121.     hookZoneRefresh*                = 102;
  122.     hookEject*                    = 103;
  123.     hookPreflight*                = 104;
  124.     hookPostflight*                = 105;
  125.     hookKeyBase*                    = 1000;
  126.  
  127. (*    NuLookup structures/constants    *)
  128.  
  129. TYPE
  130.     NLTypeEntry* = RECORD
  131.         hIcon*:                    Types.Handle;
  132.         typeStr*:                Types.Str32;
  133.     END;
  134.  
  135.     NLType* = ARRAY 4 (*ΔΔ[0..3]ΔΔ*) OF NLTypeEntry;
  136.  
  137.     NBPReply* = RECORD
  138.         theEntity*:                AppleTalk.EntityName;
  139.         theAddr*:                AppleTalk.AddrBlock;
  140.     END;
  141.  
  142.     NameFilterProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (VAR theEntity: AppleTalk.EntityName): INTEGER;
  143.     NameFilterUPP* = Types.UniversalProcPtr;
  144.  
  145. CONST
  146.     uppNameFilterProcInfo* = $000000E0; (* PROCEDURE (4 byte param): 2 byte result; *)
  147.  
  148. PROCEDURE NewNameFilterProc*(userRoutine: NameFilterProcPtr): NameFilterUPP;
  149.     (*$IF NOT GENERATINGCFM *)
  150.     INLINE PASCAL $2E9F;
  151.     (*$END*)
  152.  
  153. PROCEDURE CallNameFilterProc*(VAR theEntity: AppleTalk.EntityName; userRoutine: NameFilterUPP): INTEGER;
  154.     (*$IF NOT GENERATINGCFM*)
  155.     INLINE PASCAL $205F, $4E90;
  156.     (*$END*)
  157. TYPE
  158.     ZoneFilterProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (theZone: Types.ConstStr32Param): INTEGER;
  159.     ZoneFilterUPP* = Types.UniversalProcPtr;
  160.  
  161. CONST
  162.     uppZoneFilterProcInfo* = $000000E0; (* PROCEDURE (4 byte param): 2 byte result; *)
  163.  
  164. PROCEDURE NewZoneFilterProc*(userRoutine: ZoneFilterProcPtr): ZoneFilterUPP;
  165.     (*$IF NOT GENERATINGCFM *)
  166.     INLINE PASCAL $2E9F;
  167.     (*$END*)
  168.  
  169. PROCEDURE CallZoneFilterProc*(theZone: Types.ConstStr32Param; userRoutine: ZoneFilterUPP): INTEGER;
  170.     (*$IF NOT GENERATINGCFM*)
  171.     INLINE PASCAL $205F, $4E90;
  172.     (*$END*)
  173.  
  174. PROCEDURE InitCTBUtilities*(): CTBUErr;
  175.     EXTERNAL PASCAL;
  176. PROCEDURE CTBGetCTBVersion*(): INTEGER;
  177.     EXTERNAL PASCAL;
  178. PROCEDURE StandardNBP*(where: Types.Point; prompt: Types.ConstStr255Param; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; VAR theReply: NBPReply): INTEGER;
  179.     EXTERNAL PASCAL;
  180. PROCEDURE CustomNBP*(where: Types.Point; prompt: Types.ConstStr255Param; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; userData: LONGINT; dialogID: INTEGER; filter: Dialogs.ModalFilterUPP; VAR theReply: NBPReply): INTEGER;
  181.     EXTERNAL PASCAL;
  182. (*$IF OLDROUTINENAMES *)
  183. PROCEDURE NuLookup*(where: Types.Point; prompt: Types.ConstStr255Param; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; VAR theReply: NBPReply): INTEGER;
  184.     EXTERNAL PASCAL;
  185. PROCEDURE NuPLookup*(where: Types.Point; prompt: Types.ConstStr255Param; numTypes: INTEGER; VAR typeList: NLType; nameFilter: NameFilterUPP; zoneFilter: ZoneFilterUPP; hook: DialogHookUPP; userData: LONGINT; dialogID: INTEGER; filter: Dialogs.ModalFilterUPP; VAR theReply: NBPReply): INTEGER;
  186.     EXTERNAL PASCAL;
  187. (*$END*)
  188.  
  189. (* $ALIGN RESET*)
  190. (* $POP*)
  191.  
  192.  END CTBUtilities.
  193.